#ifndef PUBLICCONTACT_H
#define PUBLICCONTACT_H

#include <QString>
#include <QHostAddress>
#include <QTcpSocket>
#include <QVector>
#include "conversationwindow.h"
#include "conversationconector.h"

class PublicContact: public GenericContact
{
public:
    static QVector<PublicContact *> listado;
    static void ManageConection(QTcpSocket *connection);
    PublicContact();
    PublicContact(QString alias, int port, QHostAddress ip);
    ~PublicContact();
    QString getAlias();
    QHostAddress getIp();
    int getPort();
    int getInactiveTime();
    void startConversation();
    void conversationEnded();
    PublicContact newIdentityPacket(QString alias);
    PublicContact update();
    int restartConversation();
    QString getNick();
private:
    QString alias;
    QTcpSocket *conversationSocket;
    int port;
    QHostAddress ip;
    ConversationWindow *conversationwindow;
    int inactive_time;
};

#endif // PUBLICCONTACT_H
